@echo off

adb wait-for-device & adb wait-for-device

REM adb shell su "mount -o rw,remount /system"

adb push jni\minicap-shared\aosp\libs\android-25\arm64-v8a\minicap.so /data/local/tmp/libminicap64.so
REM adb shell su "cp /data/local/tmp/libminicap.so /system/lib64"

adb push jni\minicap-shared\aosp\libs\android-25\armeabi-v7a\minicap.so /data/local/tmp/libminicap.so
REM adb shell su "cp /data/local/tmp/libminicap.so /system/lib"

adb push libs\arm64-v8a\libminiserver.so /data/local/tmp/libminiserver64.so
adb push libs\armeabi-v7a\libminiserver.so /data/local/tmp/libminiserver.so
copy jni\minicap-shared\aosp\libs\android-25\arm64-v8a\minicap.so libs\arm64-v8a\libminicap.so
copy jni\minicap-shared\aosp\libs\android-25\armeabi-v7a\minicap.so libs\armeabi-v7a\libminicap.so

adb push public.libraries.txt /data/local/tmp
REM /system/vendor/etc/public.libraries.txt
REM /system/etc/public.libraries.txt
REM /etc/public.libraries.txt
adb shell < cmd.txt

pause

adb reboot